<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <#include "/view/admin/headList.html"/>

    <script type="text/javascript">

    </script>
</head>
<body>

<div class="table-class">

    <table class="table table-hover table-list table-bordered">
        <thead>
        <tr>
            <td class="table-head-btn">
                <div style="text-align:left;margin-left: 50px;">
                    <a href="${base}/xyuser/add.do" class="btn btn-primary">新增</a>
                </div>
            </td>
        </tr>

        <tr class="table-head">
            <th>序号</th>
                <th class="label-hidden">用户id</th>
                <th>用户名</th>
                <th>昵称</th>
                <th>最后登录时间</th>
                <th>用户登录ip地址</th>
                <th class="label-hidden">状态</th>

            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pagination.list as c>
            <tr>
                <td>${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
                        <td class="label-hidden">${c.userId!}</td>
                            <td>${c.username!}</td>


                            <td>${c.nickname!}</td>

                        <td><#if c.lastLogin?? >${c.lastLogin?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                            <td>${c.ip!}</td>

                        <td class="label-hidden">${c.status!}</td>

                <td>

                <@shiro.hasPermission name="2.1.1">
                    <a href="${base}/xyuser/updatepasswd.do?userId=${c.userId!}" class="btn btn-primary">修改密码</a>
                </@shiro.hasPermission>    
                <@shiro.hasPermission name="2.1.2">    
                    <a href="${base}/xyuser/add.do?userId=${c.userId!}" class="btn btn-primary">修改用户信息</a>
                </@shiro.hasPermission>

                <@shiro.hasPermission name="2.1.3">
                <a href="javascript:checkDelete('${base}/xyuser/delete.do?userId=${c.userId!}')" class="btn btn-primary">删除</a>
                </@shiro.hasPermission>
                </td>
            </tr>


        </#list>

        </tbody>
    </table>


</div>
<script>
    function queryCondition(){
        var href="";
        href+='username='+$('#username').val()+"&";

        href+='password='+$('#password').val()+"&";

        href+='nickname='+$('#nickname').val()+"&";

        href+='lastLoginStart='+$('#lastLoginStart').val()+"&";
        href+='lastLoginEnd='+$('#lastLoginEnd').val()+"&";

        href+='ip='+$('#ip').val();
        return href;
    }

</script>

</body>
</html>
